/*************************************************
* Title：TinyToolKit
* Author：Opportunity 
* Describe：
* CreateTime：2020-08-18 14:29:30
* Version：1.0
* Modify Recorder：
*************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TinyToolKit.Network
{
    public class PlayerConnEvent
    {
        //玩家上线
        public void OnLogin(Player player)
        {
        }
        
        //玩家下线
        public void OnLogout(Player player)
        {
            if (player.tempData.status == PlayerTempData.Status.Room)
            {
                Room room = player.tempData.room;
                RoomMgr.Instance.LeaveRoom(player);
                room?.Broadcast(room.GetRoomInfo());
            }
        }
    }
}

